| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Static Public Member Functions | List of all members
nkWinUi::FontUtils Class Referencefinal

Offers utility features to work with fonts. More...

## Static Public Member Functions
static nkMemory::BufferCast< nkMemory::String > | getAvailableFontFaces (System *system=nullptr)
static nkMemory::BufferCast< unsigned int > | getCharactersWidth (nkMemory::BufferView< char > characters, Font *font=nullptr, System *system=nullptr)

## Detailed Description

Offers utility features to work with fonts.

## Member Function Documentation

## ◆ getAvailableFontFaces()

static nkMemory::BufferCast<nkMemory::String> nkWinUi::FontUtils::getAvailableFontFaces | ( | System * | system = `nullptr` | ) |
| static

Retrieves the currently installed font face names.

Parameters

  system | The system to query for. If nullptr, will query for the singleton instance.

Returns
  The list of all font faces that can be used.

## ◆ getCharactersWidth()

static nkMemory::BufferCast<unsigned int> nkWinUi::FontUtils::getCharactersWidth | ( | nkMemory::BufferView< char > | characters,
|  | Font * | font = `nullptr`,
|  | System * | system = `nullptr`
| ) |  |
| static

Retrieve the requested character widths, in pixels.

Parameters

  characters | An array of the characters to retrieve the width from.
  font | The font to use for width retrieval. If left to nullptr, will use the default font.
  system | The system to query for. If nullptr, will query for the singleton instance.

Returns
  An array of pixel width, each index corresponding to their character's index in the input array.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsWinUi/Fonts/FontUtils.h